You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
linuxkm/linuxkm_wc_port.hlinuxkm/lkcapi_sha_glue.clinuxkm/simd_hammer/simd_hammer.c.wolfssl_known_macro_extras: fixes for removal of stdrng alg from the LKCAPI.
gate crypto/internal/rng.h inclusion and "stdrng" alg registration on kernel
<7.5 (<linux-next of 20261110).
add WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNG with override WOLFSSL_LINUXKM_LKCAPI_NO_STDRNG.
add dummy macro variant of wc_linux_kernel_rng_is_wolfcrypt().
add gating on WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNG as needed throughout linuxkm/lkcapi_sha_glue.c.
add a HAVE_STDRNG indicator macro to linuxkm/simd_hammer/simd_hammer.c and
gate the "rng" probe on it. also add a runtime report of the instantiated RNG
driver name, and a warning if it isn't wolfCrypt.
note, on !WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNG builds, there’s no longer a deinstall_algs prerequisite before rmmod.
bound the digSz in wc_EncodeSignature(), and catch zero (error) return from it
in wc_SignatureDerEncode(). Add test coverage to rsa_sig_test().
linuxkm/lkcapi_rsa_glue.c: add digest length checks to the pkcs1 sign callbacks,
matching those in the verify callbacks since ff93e6d and 8fef82c, by
factoring the common argument validation into km_pkcs1_check_digest_len().
tests/api/test_tls.c: skip test_tls_unset_fd_no_stdin_io() if defined(HAVE_VALGRIND).
…er/simd_hammer.c .wolfssl_known_macro_extras: fixes for removal of stdrng alg from the LKCAPI.
* gate crypto/internal/rng.h inclusion and "stdrng" alg registration on kernel
<7.5 (<linux-next of 20261110).
* add WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNG with override
WOLFSSL_LINUXKM_LKCAPI_NO_STDRNG.
* add dummy macro variant of wc_linux_kernel_rng_is_wolfcrypt().
* add gating on WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNG as needed throughout
linuxkm/lkcapi_sha_glue.c.
* add a HAVE_STDRNG indicator macro to linuxkm/simd_hammer/simd_hammer.c and
gate the "rng" probe on it. also add a runtime report of the instantiated RNG
driver name, and a warning if it isn't wolfCrypt.
* note, on !WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNG builds, there’s no longer a
deinstall_algs prerequisite before rmmod.
…c wolfcrypt/test/test.c doc/dox_comments/header_files/asn_public.h:
bound the digSz in wc_EncodeSignature(), and catch zero (error) return from it
in wc_SignatureDerEncode(). Add test coverage to rsa_sig_test().
… callbacks,
matching those in the verify callbacks since ff93e6d and 8fef82c, by
factoring the common argument validation into km_pkcs1_check_digest_len().
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Active issues include a compilation failure in the kprobe configuration without stdrng, phantom registration accounting that blocks deinstallation, and a header guard that prevents wolfCrypt RNG recognition.
Scan targets checked:linuxkm-src, linuxkm-bugs, wolfcrypt-src, wolfcrypt-bugs, wolfssl-bugs Not reviewed (no scan target covers them):.wolfssl_known_macro_extras, doc/dox_comments/header_files/asn_public.h Coverage: 9 of 9 in-scope changed file(s) opened by the reviewer
Findings: 3 3 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
linuxkm/linuxkm_wc_port.h and linuxkm/lkcapi_sha_glue.c: fix scoping of wc_linux_kernel_rng_is_wolfcrypt();
linuxkm/lkcapi_sha_glue.c: fix dummy call to wc_linuxkm_drbg_startup() to leave wc_linuxkm_drbg_loaded defined;
wolfcrypt/src/asn_orig.c: check digSz against actual size of digArray.
Scan targets checked:linuxkm-src, linuxkm-bugs, wolfcrypt-src, wolfcrypt-bugs Unchanged since last review (not re-run):wolfssl-bugs Not reviewed (no scan target covers them):.wolfssl_known_macro_extras, doc/dox_comments/header_files/asn_public.h Coverage: 2 of 3 in-scope changed file(s) opened by the reviewer; not opened: wolfcrypt/src/asn_orig.c
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The unload notice is hidden for no-STDRNG builds with random-bytes callbacks, although those builds still require deinstall_algs to release the module reference and allow rmmod; the PR description also needs qualification.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Keep the unload notice for callback-backed no-STDRNG builds
linuxkm/lkcapi_sha_glue.c:5828
With WOLFSSL_LINUXKM_LKCAPI_NO_STDRNG and random-bytes callbacks enabled, rmmod still fails because the supplied kernel patches retain a module reference until the callbacks are unregistered. This guard hides the deinstall_algs instruction needed to release that reference. Retain the unload notice for callback-backed builds too, and qualify the PR description's claim that no-STDRNG builds no longer require this step.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
linuxkm/linuxkm_wc_port.hlinuxkm/lkcapi_sha_glue.clinuxkm/simd_hammer/simd_hammer.c.wolfssl_known_macro_extras: fixes for removal ofstdrngalg from the LKCAPI.gate
crypto/internal/rng.hinclusion and "stdrng" alg registration on kernel<7.5 (<linux-next of 20261110).
add
WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNGwith overrideWOLFSSL_LINUXKM_LKCAPI_NO_STDRNG.add dummy macro variant of
wc_linux_kernel_rng_is_wolfcrypt().add gating on
WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNGas needed throughoutlinuxkm/lkcapi_sha_glue.c.add a
HAVE_STDRNGindicator macro tolinuxkm/simd_hammer/simd_hammer.candgate the "rng" probe on it. also add a runtime report of the instantiated RNG
driver name, and a warning if it isn't wolfCrypt.
note, on !
WOLFSSL_LINUXKM_LKCAPI_HAVE_STDRNGbuilds, there’s no longer adeinstall_algsprerequisite beforermmod.wolfcrypt/src/asn.cwolfcrypt/src/asn_orig.cwolfcrypt/src/signature.cwolfcrypt/test/test.cdoc/dox_comments/header_files/asn_public.h:bound the
digSzinwc_EncodeSignature(), and catch zero (error) return from itin
wc_SignatureDerEncode(). Add test coverage torsa_sig_test().linuxkm/lkcapi_rsa_glue.c: add digest length checks to the pkcs1 sign callbacks,matching those in the verify callbacks since ff93e6d and 8fef82c, by
factoring the common argument validation into
km_pkcs1_check_digest_len().tests/api/test_tls.c: skiptest_tls_unset_fd_no_stdin_io()ifdefined(HAVE_VALGRIND).tested with